package com.snailxr.base.task.domain;

import javax.validation.constraints.NotNull;

import org.springframework.data.mongodb.core.mapping.Document;

import com.snailxr.base.annotation.AutoIncKey;
/**
 * 浪潮接口实体类
 * @author luoshijian
 *
 */
@Document(collection="apiObj")//数据库集合为scheduleJob
public class APIObj {
	@AutoIncKey
	private int apiId;//自定义自增id
	
	@NotNull(message="{apiObj.host.notnull}")
	private String host;//接口IP
	@NotNull(message="{apiObj.port.notnull}")
	private String port;//接口端口
	@NotNull(message="{apiObj.apiStr.notnull}")
	private String apiStr;//接口字符串
	@NotNull(message="{apiObj.args.notnull}")
	private String args;//接口参数
	@NotNull(message="{apiObj.description.notnull}")
	private String description;//描述
	@NotNull(message="{apiObj.region.notnull}")
	private String region;//行政区划
	@NotNull(message="{apiObj.regionCode.notnull}")
	private String regionCode;//行政区划代码
	@NotNull(message="{apiObj.remark.notnull}")
	private String remark;//备注
	
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	public String getArgs() {
		return args;
	}
	public void setArgs(String args) {
		this.args = args;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getRegion() {
		return region;
	}
	public void setRegion(String region) {
		this.region = region;
	}
	public String getRegionCode() {
		return regionCode;
	}
	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}
	public int getApiId() {
		return apiId;
	}
	public void setApiId(int apiId) {
		this.apiId = apiId;
	}
	public String getApiStr() {
		return apiStr;
	}
	public void setApiStr(String apiStr) {
		this.apiStr = apiStr;
	}
	@Override
	public String toString() {
		return String.format(
				"APIObj [apiId=%s, host=%s, port=%s, apiStr=%s, args=%s, description=%s, region=%s, regionCode=%s, remark=%s]",
				apiId, host, port, apiStr, args, description, region, regionCode, remark);
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
